/**
 * 
 */
package com.pmsco.pms.ajaxdata;

import com.pmsco.pms.core.domain.SubCategory;

/**
 * @author Tran Thanh Long
 *
 */
public class SubCategoryJsonData {
	private Long id;
	private String name;
	private String enName;
	private String description;
	private String category;

	public SubCategoryJsonData(SubCategory subCategory) {
		this.id = subCategory.getId();
		this.name = subCategory.getName();
		this.enName = subCategory.getEnName();
		this.description = subCategory.getDescription();
		if(subCategory.getCategory() != null)
			this.category = subCategory.getCategory().getName();
		else
			this.category = "";
	}
	
	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * @return the enName
	 */
	public String getEnName() {
		return enName;
	}
	
	/**
	 * @param enName the enName to set
	 */
	public void setEnName(String enName) {
		this.enName = enName;
	}
	
	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}
	
	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}
	
	/**
	 * @return the category
	 */
	public String getCategory() {
		return category;
	}
	
	/**
	 * @param category the category to set
	 */
	public void setCategory(String category) {
		this.category = category;
	}
}
